Optimal. Leaf size=363 \[ \frac{(c+d x)^{-m-2} (e+f x)^{m+1} \left (a d f (c f h (m+1)+d (2 f g-e h (m+3)))+b \left (c^2 f^2 h \left (m^2+3 m+2\right )+c d f (m+1) (f g-2 e h (m+3))+d^2 (-e) (m+3) (f g-e h (m+2))\right )\right )}{d^2 f (m+2) (m+3) (d e-c f)^2}-\frac{(c+d x)^{-m-1} (e+f x)^{m+1} \left (a d f (c f h (m+1)+d (2 f g-e h (m+3)))+b \left (c^2 f^2 h \left (m^2+3 m+2\right )+c d f (m+1) (f g-2 e h (m+3))+d^2 (-e) (m+3) (f g-e h (m+2))\right )\right )}{d^2 (m+1) (m+2) (m+3) (d e-c f)^3}-\frac{(c+d x)^{-m-3} (e+f x)^{m+1} (a d f (d g-c h)-b c (c f h (m+2)+d (f g-e h (m+3)))+b d h (m+3) x (d e-c f))}{d^2 f (m+3) (d e-c f)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 1.12502, antiderivative size = 360, normalized size of antiderivative = 0.99, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103 \[ \frac{(c+d x)^{-m-2} (e+f x)^{m+1} \left (a d f (c f h (m+1)-d e h (m+3)+2 d f g)+b \left (c^2 f^2 h \left (m^2+3 m+2\right )+c d f (m+1) (f g-2 e h (m+3))+d^2 (-e) (m+3) (f g-e h (m+2))\right )\right )}{d^2 f (m+2) (m+3) (d e-c f)^2}-\frac{(c+d x)^{-m-1} (e+f x)^{m+1} \left (a d f (c f h (m+1)-d e h (m+3)+2 d f g)+b \left (c^2 f^2 h \left (m^2+3 m+2\right )+c d f (m+1) (f g-2 e h (m+3))+d^2 (-e) (m+3) (f g-e h (m+2))\right )\right )}{d^2 (m+1) (m+2) (m+3) (d e-c f)^3}-\frac{(c+d x)^{-m-3} (e+f x)^{m+1} (a d f (d g-c h)-b c (c f h (m+2)-d e h (m+3)+d f g)+b d h (m+3) x (d e-c f))}{d^2 f (m+3) (d e-c f)} \]
Antiderivative was successfully verified.
[In] Int[(a + b*x)*(c + d*x)^(-4 - m)*(e + f*x)^m*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 125.324, size = 337, normalized size = 0.93 \[ \frac{\left (c + d x\right )^{- m - 1} \left (e + f x\right )^{m + 1} \left (b c^{2} f^{2} h \left (m + 1\right ) \left (m + 2\right ) + c d f \left (m + 1\right ) \left (- 2 b e h \left (m + 3\right ) + f \left (a h + b g\right )\right ) + d^{2} \left (2 a f^{2} g + b e^{2} h \left (m + 2\right ) \left (m + 3\right ) - e f \left (m + 3\right ) \left (a h + b g\right )\right )\right )}{d^{2} \left (m + 1\right ) \left (m + 2\right ) \left (m + 3\right ) \left (c f - d e\right )^{3}} - \frac{\left (c + d x\right )^{- m - 3} \left (e + f x\right )^{m + 1} \left (- a d^{2} f g + b c^{2} f h \left (m + 2\right ) + b d h x \left (m + 3\right ) \left (c f - d e\right ) + c d \left (- b e h \left (m + 3\right ) + f \left (a h + b g\right )\right )\right )}{d^{2} f \left (m + 3\right ) \left (c f - d e\right )} + \frac{\left (c + d x\right )^{- m - 2} \left (e + f x\right )^{m + 1} \left (b c^{2} f^{2} h \left (m + 1\right ) \left (m + 2\right ) + c d f \left (m + 1\right ) \left (- 2 b e h \left (m + 3\right ) + f \left (a h + b g\right )\right ) + d^{2} \left (2 a f^{2} g + b e^{2} h \left (m + 2\right ) \left (m + 3\right ) - e f \left (m + 3\right ) \left (a h + b g\right )\right )\right )}{d^{2} f \left (m + 2\right ) \left (m + 3\right ) \left (c f - d e\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((b*x+a)*(d*x+c)**(-4-m)*(f*x+e)**m*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 2.35457, size = 321, normalized size = 0.88 \[ \frac{(c+d x)^{-m-3} (e+f x)^{m+1} \left (a \left (c^2 f (m+3) (-e h+f g (m+2)+f h (m+1) x)+c d \left (e^2 h (m+1)-2 e f \left (g \left (m^2+4 m+3\right )+h \left (m^2+4 m+5\right ) x\right )+f^2 x (2 g (m+3)+h (m+1) x)\right )+d^2 \left (e^2 (m+1) (g (m+2)+h (m+3) x)-e f x (2 g (m+1)+h (m+3) x)+2 f^2 g x^2\right )\right )+b \left (c^2 \left (2 e^2 h-e f (g (m+3)+2 h (m+1) x)+f^2 (m+1) x (g (m+3)+h (m+2) x)\right )+c d \left (e^2 (g (m+1)+2 h (m+3) x)-2 e f x \left (g \left (m^2+4 m+5\right )+h \left (m^2+4 m+3\right ) x\right )+f^2 g (m+1) x^2\right )+d^2 e (m+3) x (e g (m+1)+e h (m+2) x-f g x)\right )\right )}{(m+1) (m+2) (m+3) (c f-d e)^3} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b*x)*(c + d*x)^(-4 - m)*(e + f*x)^m*(g + h*x),x]
[Out]
_______________________________________________________________________________________
Maple [B] time = 0.012, size = 906, normalized size = 2.5 \[ -{\frac{ \left ( dx+c \right ) ^{-3-m} \left ( fx+e \right ) ^{1+m} \left ( -b{c}^{2}{f}^{2}h{m}^{2}{x}^{2}+2\,bcdefh{m}^{2}{x}^{2}-b{d}^{2}{e}^{2}h{m}^{2}{x}^{2}-a{c}^{2}{f}^{2}h{m}^{2}x+2\,acdefh{m}^{2}x-acd{f}^{2}hm{x}^{2}-a{d}^{2}{e}^{2}h{m}^{2}x+a{d}^{2}efhm{x}^{2}-b{c}^{2}{f}^{2}g{m}^{2}x-3\,b{c}^{2}{f}^{2}hm{x}^{2}+2\,bcdefg{m}^{2}x+8\,bcdefhm{x}^{2}-bcd{f}^{2}gm{x}^{2}-b{d}^{2}{e}^{2}g{m}^{2}x-5\,b{d}^{2}{e}^{2}hm{x}^{2}+b{d}^{2}efgm{x}^{2}-a{c}^{2}{f}^{2}g{m}^{2}-4\,a{c}^{2}{f}^{2}hmx+2\,acdefg{m}^{2}+8\,acdefhmx-2\,acd{f}^{2}gmx-acd{f}^{2}h{x}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^{2}{e}^{2}f-6\,{d}^{3}{e}^{3}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((b*x+a)*(d*x+c)^(-4-m)*(f*x+e)^m*(h*x+g),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (b x + a\right )}{\left (h x + g\right )}{\left (d x + c\right )}^{-m - 4}{\left (f x + e\right )}^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x + a)*(h*x + g)*(d*x + c)^(-m - 4)*(f*x + e)^m,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.257777, size = 2171, normalized size = 5.98 \[ \text{result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x + a)*(h*x + g)*(d*x + c)^(-m - 4)*(f*x + e)^m,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x+a)*(d*x+c)**(-4-m)*(f*x+e)**m*(h*x+g),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (b x + a\right )}{\left (h x + g\right )}{\left (d x + c\right )}^{-m - 4}{\left (f x + e\right )}^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x + a)*(h*x + g)*(d*x + c)^(-m - 4)*(f*x + e)^m,x, algorithm="giac")
[Out]